<?php
/*
牛肉工厂，猪肉工厂
*/
abstract class factory{
	abstract function say();
}
class beefFactory extends factory{
	public function say(){
		echo "我是牛肉工厂";
	}
}
class porkFactory extends factory{
    public function say(){
        echo "我是zhu肉工厂";
    }
}
class client{
    static function say($factory){
        if($factory == 'beef'){
            (new beefFactory())->say();
        }else if ($factory == 'pork'){
            (new porkFactory())->say();
        }
    }
}
client::say("pork");